import frame.core.SqlSession;
import frame.factory.SqlSessionFactory;
import frame.factory.SqlSessionFactoryBuilder;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.List;

/**
 * FileName: testSession
 * Author:   xuan zongjun
 * Date:     2020/11/4 14:29
 * Description:
 */


public class testSession {

    public static void main(String[] args) throws Exception {


        SqlSessionFactoryBuilder sqlSessionFactoryBuilder = new SqlSessionFactoryBuilder();
        File file = new File( "E:\\develop2\\mybatis-api-test\\src\\main\\resources\\jdbc.xml" );

        InputStream inputStream = new FileInputStream( file );
        SqlSessionFactory build = sqlSessionFactoryBuilder.build( inputStream );
        SqlSession sqlSession = build.openSession();

        List<Object> objects = sqlSession.selectList( "test.queryUserList" );
        System.out.println(objects);


    }
}
